package com.zs.blog.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @Title: ArticleListVO
 * @Author zs
 * @Package com.zs.blog.model.vo
 * @Date 2024/12/4 22:05
 * @description: 用于在后台展示文章列表的数据模型
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ArticleListVO {
    @Schema(description = "文章ID")
    private Long id;

    @Schema(description = "文章标题")
    private String articleTitle;

    @Schema(description = "文章类型")
    private Integer articleType;

    @Schema(description = "文章缩略图")
    private String articleThumb;

    @Schema(description = "文章分类")
    private String categoryName;

    @Schema(description = "文章标签列表")
    private List<String> tagNameList;

    @Schema(description = "作者")
    private String author;

    @Schema(description = "是否置顶[0:否,1:是]")
    private Integer isTop;

    @Schema(description = "是否可见[0:否,1:是]")
    private Integer isViewed;

    @Schema(description = "是否删除[0:否,1:是]")
    private Integer isDeleted;

    @Schema(description = "浏览量")
    private Long viewCount;

    @Schema(description = "点赞数")
    private Long likeCount;

    @Schema(description = "原文链接")
    private String originUrl;

    @Schema(description = "创建时间")
    @JsonFormat(timezone = "GMT+8", locale = "zh", pattern = "yyyy-MM-dd hh:mm:ss", shape = JsonFormat.Shape.STRING)
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @JsonFormat(timezone = "GMT+8", locale = "zh", pattern = "yyyy-MM-dd hh:mm:ss", shape = JsonFormat.Shape.STRING)
    private LocalDateTime updateTime;
}
